home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc20 / gemfsc20.lzh / GEMFBIND / VGETPIX.S < prev    next >
Text File  |  1993-03-26  |  1KB  |  47 lines

  1. ;*========================================================================
  2. ;* VDIFAST Public Domain VDI bindings.
  3. ;*========================================================================
  4.  
  5.  
  6. ;*------------------------------------------------------------------------
  7. ;* Get pixel.
  8. ;*------------------------------------------------------------------------
  9.  
  10.           globl     _v_get_pixel
  11. _v_get_pixel:
  12. ;    .cargs    #8,handle.w,x.w,y.w,pel.l,index.l
  13.  
  14. handle      =         8
  15. x          =         10
  16. y          =         12
  17. pel       =         14
  18. index      =         18
  19.  
  20.           link        a6,#-4                ;* Allocate intout[2].
  21.  
  22. ;          VContrl    #105,,#1
  23.           move.w    handle(a6),-(sp)    ; contrl[6]
  24.           clr.l     -(sp)                ; contrl[5,4]
  25.           clr.l     -(sp)                ; contrl[3,2]
  26.           move.w    #1,-(sp)            ; contrl[1]
  27.           move.w    #105,-(sp)            ; contrl[0]
  28.  
  29.           subq.l    #4,sp                ;* -> ptsout
  30.           pea        -4(a6)                ;* -> intout
  31.           pea        x(a6)                ;* -> ptsin
  32.           subq.l    #4,sp                ;* -> intin
  33.           pea        16(sp)                ;* -> contrl
  34.  
  35.           move.l    sp,d1
  36.           jsr        vditrap
  37.  
  38.           move.l    pel(a6),a0            ;* Return pixel value
  39.           move.w    -4(a6),(a0)         ;* from intout[0].
  40.           move.l    index(a6),a0        ;* Return index value
  41.           move.w    -2(a6),(a0)         ;* from intout[1].
  42.  
  43.           unlk        a6
  44.           rts
  45.  
  46.           end
  47.